namespace FutureApp.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class cms1 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.FutureMessages",
                c => new
                    {
                        Id = c.Guid(nullable: false),
                        Title = c.String(nullable: false, maxLength: 50),
                        Content = c.String(nullable: false, maxLength: 1000),
                        SendTime = c.DateTime(),
                        CreationTime = c.DateTime(nullable: false),
                        CreatorUserId = c.Long(),
                    })
                .PrimaryKey(t => t.Id)
                .ForeignKey("dbo.FutureUsers", t => t.CreatorUserId)
                .Index(t => t.CreatorUserId);
            
        }
        
        public override void Down()
        {
            DropForeignKey("dbo.FutureMessages", "CreatorUserId", "dbo.FutureUsers");
            DropIndex("dbo.FutureMessages", new[] { "CreatorUserId" });
            DropTable("dbo.FutureMessages");
        }
    }
}
